

package ro.ase.catalog.security.service;

import ro.ase.catalog.beans.Setting;
import ro.ase.catalog.beans.User;
import ro.ase.catalog.security.SecurityException;

import java.util.List;
import java.util.Set;


public interface IUserService {
    

    public void add(User user) throws SecurityException;
    

    public boolean isExistedByUsername(String username);


    public void updateMe(User user) throws SecurityException;


    public void update(User user) throws SecurityException;
    

    public Integer findByFullnameVagueCount(String fullname);


    public List<User> findByFullnameVaguePerPage(String fullname, int start, int limit);
    
    

    public List<Setting> findSettingByName(String name);


    public Set<Setting> findSettingByList(List<Setting> settings);
    

    public Set<Setting> getSettings(int userId);
    

    public void delete(int[] userIds);
    

    public void updateStatus(int[] userIds);


    public List<User> findUsersByRoleIdPerPage(int roleId, int start, int limit);


    public Integer findUsersByRoleIdCount(int roleId);


    public void bindUsers(int[] userIds, int roleId);


    public void unBindUsers(int[] userIds, int roleId);
    

    public void forgotPasswordStepOne(String username, String baseUrl, String locale) throws SecurityException;
    

    public User findByTokenKey(String tokenKey) throws SecurityException;
    

    public void forgotPasswordStepTwo(String key, String password) throws SecurityException;
    
}
